package com.google.code.sapwcrawler.data.html;
import java.net.URL;

public class Link
{
	private String title;
	private String rel;
	private URL href;
	
	public Link(String title,URL href)
	{
		this(title,href,null);
	}
	
	public Link(String title,URL href,String rel)
	{
		this.title	= title;
		this.href 	= href;
		this.rel	= rel;
	}
	
	public String getTitle()
	{
		return title;
	}
	
	public String getRel()
	{
		return rel;
	}
	
	public URL getHref()
	{
		return href;
	}
	
	@Override
	public String toString()
	{
		return "{ title: " + title + "; href: " + href.toString() + "; rel: " + rel + "}";
		//return String.format("{ title: " ; href: %2 }",title,href.toString());
	}
}
